package com.bawei.mall.product.controller;

import com.bawei.common.core.domain.R;
import com.bawei.mall.product.service.ICShoppingCartService;
import com.bawei.mall.product.domain.Po.ShoppingCart;
import lombok.extern.log4j.Log4j2;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Author：liurui
 * @Package：com.bawei.mall.search.controller
 * @Project：mall_cloud
 * @name：ShoppingCartController
 */
@RestController
@Log4j2
@RequestMapping("/shoppingcart")
public class CShoppingCartController {
    @Autowired
    private ICShoppingCartService service;

    /**
     * 查询列表
     * @return
     */
    @GetMapping("/list")
    public R<List<ShoppingCart>> list(){
        List<ShoppingCart> list=service.list();
        return R.ok(list);
    }
}
